package cn.oms.emali.service.controller;

import cn.oms.emali.service.api.IEmailService;
import cn.oms.emali.service.entity.Email;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@Api("")
@ApiOperation(value = "邮件发送模块", notes = "邮件发送模块")
@RequestMapping("/email")
public class EmailController {

    @Resource
    private IEmailService emailService;


    @ApiOperation(value = "发送邮件", httpMethod = "POST")
//    @GetMapping("/question/{id}")
    @GetMapping()
    public void sendEmail(){
        Email email = new Email();
        email.setContennt("");
        email.setTitle("");
        email.setTo("");
        emailService.sendEmail(email);
    }

}
